import type { RouteRecordRaw } from 'vue-router';

export default class ImportMetaUtil {
  static getRouterModules(appModules: Record<string, { [key: string]: any }>[]): RouteRecordRaw[] {
    let appModuleList: RouteRecordRaw[] = [];
    appModules.forEach((item: Record<string, { [key: string]: any }>) => {
      Object.keys(item).forEach((key) => {
        appModuleList = appModuleList.concat(item[key].default);
      });
    });

    return appModuleList;
  }
}
